<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
			$(function() {
				$(".date").datepicker({
					showWeek : true,
					firstDay : 1,
					dateFormat : 'yy-mm-dd',
					showOtherMonths : true,
					selectOtherMonths : true,
				});

			});
		</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<form class="form-inline" method="post">
			<fieldset>
				<legend>学员报名记录表</legend>
				<div class="row-fluid">
					<label>
						学员名称：<input type="text" name="name" value="${name}" />
					</label>
					<label style="margin-left: 20px; margin-right: 20px;" class="radio">
						<input <s:if test="check==1">checked="checked"</s:if> type="radio" name="check" value="1" /> 已确认
					</label>
					<label style="margin-left: 20px; margin-right: 20px;" class="radio">
						<input <s:if test="check==2">checked="checked"</s:if> type="radio" name="check" value="2" /> 未确认
					</label>
					<label style="margin-left: 20px; margin-right: 20px;" class="radio">
						<input <s:if test="check==0">checked="checked"</s:if> type="radio" name="check" value="0" /> 全部
					</label>
					<button class="btn btn-primary" type="submit" id="serach">筛选</button>
				</div>
				<div>
					<label class="checkbox">Constants:</label>
					<s:checkboxlist list="constants" name="constansId" listKey="id" listValue="name"></s:checkboxlist>
				</div>
			</fieldset>
		</form>

		<div>每页${signCourseLogs.size}项，共 ${signCourseLogs.totalElements} 项，当前${signCourseLogs.number+1}/ ${signCourseLogs.totalPages}页</div>
		<table class="table">
			<thead>
				<tr>
					<th>学员基本信息</th>
					<th>听课证号</th>
					<th>注册课程</th>
					<th>学习时间</th>
					<th>学期开始时间</th>
					<th>学期结束时间</th>
					<th>划次卡号</th>
					<th>课时数</th>
					<th>合同号</th>
					<th>发放书籍</th>
					<th>备注</th>
				</tr>
			</thead>
			<s:iterator value="signCourseLogs" var="signCourseLog">
				<tbody>
					<tr>
						<td>
							<div>
								<s:url namespace="/log" action="viewLogByTime" id="viewLogByTime">
									<s:param name="id" value="student.id" />
								</s:url>
								姓名：
								<a href="${viewLogByTime }">
									<strong>${signCourseLog.student.name}</strong>
								</a>
							</div>
							<div>学号：${signCourseLog.student.stuId}</div>
							<div>CC：${signCourseLog.student.consultor.name}</div>
							<div>Tutor：${signCourseLog.student.tutor.name}</div>
						</td>
						<td>${signCourseLog.lessonCard}</td>
						<td><s:url action="checkSign" namespace="/finance" id="checkSign">
								<s:param name="id" value="id"></s:param>
							</s:url> <s:if test="#signCourseLog.checked==false">
								<a href="${checkSign}"> ${signCourseLog.course.name} </a>
							</s:if> <s:else>
						 ${signCourseLog.course.name}
						</s:else></td>
						<td>${signCourseLog.term}</td>
						<td><s:date name="#signCourseLog.beginTime" format="yyyy-MM-dd" /></td>
						<td><s:date name="#signCourseLog.endTime" format="yyyy-MM-dd" /></td>
						<td>${signCourseLog.cardId}</td>
						<td>${signCourseLog.times}</td>
						<td>${signCourseLog.contractId}</td>
						<td>${signCourseLog.book}</td>
						<td>${signCourseLog.note}</td>
					</tr>
				</tbody>
			</s:iterator>
		</table>
		<jsp:include page="/components/pagination/paginations.jsp"></jsp:include>
	</tiles:putAttribute>
</tiles:insertDefinition>